<template>
    <div>
        <ul style="height: 30px; margin-bottom: 0px;">
          <li @click="check('baoan')" :class="current=='baoan'?'nav_active':''"  class="l_left total_chose_pl">数字保安</li>
          <li @click="check('shequ')" :class="current=='shequ'?'nav_active':''" class="l_left total_chose_pl">平安社区</li>
          <li @click="check('fuwu')" :class="current=='fuwu'?'nav_active':''" class="l_left total_chose_pl">服务力量</li>
          <li @click="check('xiaoyuan')" :class="current=='xiaoyuan'?'nav_active':''" class="r_right total_chose_pl">平安校园</li>
          <li @click="check('jiankong')" :class="current=='jiankong'?'nav_active':''" class="r_right total_chose_pl">实时监控</li>
          <li @click="check('jifang')" :class="current=='jifang'?'nav_active':''" class="r_right total_chose_pl">云技防</li>
        </ul>
    </div>
</template>

<script>
export default {
  components: {},
  props: { current:String },
  name: "header",
  data() {
    return {
       
    };
  },
  methods: {
      check(e){
          let that = this;
          switch(e){
              case 'baoan':{
                 that.$router.push({ path: "/first" });
                 
                 break;
              }
              case 'shequ':{
                   that.$router.push({ path: "/community" });
                   break;
              }
               case 'fuwu':{
                   that.$router.push({ path: "/service" });
                   break;
              }
              default:{
                 that.$router.push({ path: "/cloud" });
              }
          }
      }
  }
}
</script>
<style lang="scss">

</style>